1. Field of the Invention
The present invention relates to a method and an apparatus of decoding a moving image which is encoded according to the MPEG standard.
2. Description of the Related Art
The MPEG standard uses a system time clock STC, and a presentation time stamp PTS added to image and sound data, in order to reproduce the image and the sound with synchronizing them.
A moving image decoder according to the MPEG standard predicts a time difference between a decoding start point at which encoded image data are read from a buffer memory and a read start point at which display decoded image data are read from a frame memory, and adds the predicted time to STC, thereby performing processing which corresponds to a shift of PTS from STC at the decoding start point. When absolute value of such a shift is equal to or longer than a display period for displaying one frame (i.e., one picture), for instance, the moving image decoder repeats or skips a display image of one frame. However, in variable schedule processing, since such a time shift varies depending on a decoding time of one frame or other factors, the predicted time includes an error, which in turn makes it impossible to perform processing which corresponds to an accurate shift of PTS from STC.